<?php
/**
 *  view: view_profile
 *  file: profile/view_profile.php
 */
//$user_name = ( $user->name!="" )?$user->name:$user->username;
$user_name = $user->username;
?>

<div id="f_main">
 	<div class="f_container">
    
    <h3>
      <?php 
      if( true == $user->is_online)
        echo "<span class='online' title='Online'></span>";
      else
        echo "<span class='offline' title='Offline'></span>";
      ?>
      <?php echo( $user->name!="" )?$user->name:$user->username; ?> (<?php echo $user->age; ?>)
    </h3>
     <div class="block-left">
    	<?php if( NULL != $main_image ){ ?>
    	<img class="profil" src="<?php echo base_url(); ?>profile/image/small/<?php echo $user->id .'/'. $main_image; ?>" alt="<?php echo $user_name; ?>" />
        <?php } else { ?>
        <img class="profil" src="<?php echo base_url(); ?>img/no_image.gif" alt="" />
        <?php } ?>
        
        <p><img src="<?php echo base_url(); ?>img/template/gallery.png" align="left" width="25" height="20" alt="gallery"><a href="<?php echo base_url(); ?>profile/view-profile-photo/<?php echo $user->username ?>.htm"><?php echo lang('view_photo_gallery'); ?></a></p>
        <div class="baloon"></div>
        <div class="about-me">
        <p><span><?php echo lang('flirtyy_profile_text'); ?> </span><?php echo $user->flirt_text; ?></p>
        </div>
    </div><!--end block-left-->
    
    <div class="block">
    	<h4><?php echo lang('basic_information'); ?></h4>
        
        <div id="response"></div>
        
        <div class="profil-location">
        <img src="<?php echo base_url(); ?>img/template/map-profile.png" width="101" height="75" alt="map" />
        <p><?php echo lang('postal_code'); /* lang($user->location);*/ ?><br />
          <span><em><?php echo substr($user->zip_code, 0, 1) ; ?>xxxx</em></span>
        </p>
        <div class="search-region">
          <form action="<?php echo base_url(); ?>search.htm" method="post" id="form-zip-code" >
            <input type="hidden" id="zip_code" name="filter[postal_code]" value="<?php echo substr($user->zip_code, 0, 1) ; ?>" />
            <a href="javascript: void(null)" id='zip-code-search'><img src="<?php echo base_url(); ?>img/template/search-btn.png" width="23" height="24" alt="search" ><?php echo lang('find_people_from_region'); ?></a>
          </form>          
        
        </div>
        <div class="clr"></div>
        </div><!--profil-location-->
        <div class="clr"></div>
        <div class="profil-info">
        	<p><span><?php echo lang('age'); ?>: </span><?php echo $user->age; ?></p>
            <p><span><?php echo lang('gender'); ?>: </span><?php echo lang($user->gender); ?></p>
            <!--<p><span><?php echo lang('status'); ?>: </span>Solo</p> -->
            <p><span><?php echo lang('profile_looking_for'); ?>: </span><?php echo lang($user->look_for); ?></p>
            
        </div><!--end profil-info-->
        
        <h4><?php echo lang('photo_gallery'); ?><span><a class="link-edit" href="<?php echo base_url(); ?>profile/view_profile_photo/<?php echo $user->username ?>.htm"><?php echo lang('view_photo_gallery'); ?></a></span></h4>
        
        <?php $this->load->view('profile/part/gallery_items'); ?>
        
    </div><!--end block-->
    <div class="block-right">
      
        <div class="basic-module" id="profile-side-menu">
          
            <?php
            $this->load->view('profile/part/view_profile_side_menu');
            ?> 
          
        </div><!--end basic-module-->
        
    	<div class="side-module" id="my_favorites">
        
            <?php $this->load->view('modules/my_favorites'); ?>
          
        </div><!--End side-module-->
        <div class="basic-module">
          
            <?php $this->load->view('modules/whos_viewed_your_profile');  ?>
          
        </div><!--End basic-module-->
        
    </div><!--end block-right-->
    </div><!--end f_container-->
 </div><!--end f_main-->



